<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/base.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/info-reg.css" />
<title>移动办公自动化系统</title>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.js">
</script>
<script type="text/javascript">
	function check(){
		var npwd=$("#npwd").val();
		var nnpwd=$("#nnpwd").val();
		if($("#pwd").val() != "${login_User.userPwd}"){
			alert("初始密码错误");
		}else if(npwd != nnpwd || npwd == ""|| nnpwd == ""){
			alert("两次密码输入不一致");
		}else{
			alert("修改密码成功，请重新登录");
			$("#form1").submit();
		}
	}
</script>
</head>

<body>
<div class="title"><h2>修改密码</h2></div>
<div class="main">
<form action="MessageManager.action?method=update" method="post" target="_top" id="form1">
<table>
	<tr><td><p class="short-input ue-clear">
    	<label>原始密码：</label> </p></td><td><p class="short-input ue-clear">
        <input type="password" name="pwd" id="pwd"/>
    </p>
       </td>
    </tr>
    <tr><td><p class="short-input ue-clear">
    	<label>新密码：</label> </p></td><td><p class="short-input ue-clear">
        <input type="password" name="npwd" id="npwd" />
    </p>
         </td>
         </tr>
    <tr><td><p class="short-input ue-clear">
    	<label>确认新密码：</label> </p></td><td><p class="short-input ue-clear">
        <input type="password" name="nnpwd" id="nnpwd" />
    </p>
         </td>
         </tr>
    </table>
    </form>
</div>
<div class="btn ue-clear">
	<a href="javascript:check();" class="confirm">确定</a>
    <a href="javascript:history.back();" class="clear">返回</a>
</div>
</body>
</html>
